import { createStore } from 'vuex'

const store = createStore({
  state: {
    isLogin: false,
    username: "",
    password: "",
  },
  mutations: {
    login(name, pass) {
      this.state.isLogin = true
      this.state.username = name
      this.state.password = pass
    },
    logout() {
      this.state.isLogin = false
      this.state.username = ""
      this.state.password = ""
    }
  },
  actions: {
  },
  modules: {
  }
})

export default store
